package com.bfly.mall.product.dto;

import com.bfly.core.config.ResourceConfigure;
import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;

/**
 * 产品图片表单DTO
 *
 * @author 长沙商脉科技有限公司
 * @date 2020/4/16 10:56
 */
public class ProductImgFormDTO implements Serializable {

    private static final long serialVersionUID = 7551227235889160830L;
    private int seq;
    private String thumbImg;
    private String originalImg;

    public String getUrl() {
        return StringUtils.isNotBlank(getOriginalImg()) ? ResourceConfigure.getResourceHttpUrl(getOriginalImg()) : "";
    }

    public int getSeq() {
        return seq;
    }

    public void setSeq(int seq) {
        this.seq = seq;
    }

    public String getThumbImg() {
        return thumbImg;
    }

    public void setThumbImg(String thumbImg) {
        this.thumbImg = thumbImg;
    }

    public String getOriginalImg() {
        return originalImg;
    }

    public void setOriginalImg(String originalImg) {
        this.originalImg = originalImg;
    }
}
